module.exports = function(window, document) {
	var apivm = require('../../common/avm.min')(window, document);
	var avm = apivm;
	var api = apivm.api;
	var Component = apivm.Component;
	var $ = apivm.$;
	(function() {
	var Tabbar = /*@__PURE__*/ (function(Component) {
		function Tabbar(props) {
			Component.call(this, props);
			this.data = {};
		}

		if (Component) Tabbar.__proto__ = Component;
		Tabbar.prototype = Object.create(Component && Component.prototype);
		Tabbar.prototype.constructor = Tabbar;
		Tabbar.prototype.apiready = function() {};
		Tabbar.prototype.goPage = function(pagename) {
			var pagePath = {
				index: "../index/index",
				friend: "../friend/friend",
				message: "../message/message",
				me: "../me/me",
				addVideo: "../addVideo/addVideo"
			};

			wx.redirectTo({url: pagePath[pagename]});
		};
		Tabbar.prototype.render = function() {
			var this$1 = this;
			return apivm.h(
				"view",
				{class: "tabbar"},
				apivm.h(
					"view",
					{
						class: "tab-item",
						style: {color: this.props.active == "index" ? "#fff" : "#bbb"},
						onClick: function() {
							return this$1.goPage("index");
						}
					},
					"首页"
				),
				apivm.h(
					"view",
					{
						class: "tab-item",
						style: {color: this.props.active == "friend" ? "#fff" : "#bbb"},
						onClick: function() {
							return this$1.goPage("friend");
						}
					},
					"朋友"
				),
				apivm.h(
					"view",
					{
						class: "tab-item",
						onClick: function() {
							return this$1.goPage("addVideo");
						}
					},
					apivm.h("image", {src: "../../image/add.png"})
				),
				apivm.h(
					"view",
					{
						class: "tab-item",
						style: {color: this.props.active == "message" ? "#fff" : "#bbb"},
						onClick: function() {
							return this$1.goPage("message");
						}
					},
					"消息"
				),
				apivm.h(
					"view",
					{
						class: "tab-item",
						style: {color: this.props.active == "me" ? "#fff" : "#bbb"},
						onClick: function() {
							return this$1.goPage("me");
						}
					},
					"我"
				)
			);
		};

		return Tabbar;
	})(Component);
	apivm.define("tabbar", Tabbar);

	var Friend = /*@__PURE__*/ (function(Component) {
		function Friend(props) {
			Component.call(this, props);
			this.data = {
				videoList: [
					{
						id: "000",
						nickname: "老陈打码",
						content: "新年快乐，万事如意！",
						like: "3.5w",
						share: "3821",
						collect: "2988",
						comment: "3475",
						isLike: false,
						pubtime: "2022-01-10 01:30",
						headimg: "https://a415432669.github.io/shortvideo/000.jpg",
						src: "https://a415432669.github.io/shortvideo/000.mp4"
					},

					{
						id: "001",
						nickname: "学习通知",
						content: "快乐学习APICloud多端应用开发",
						like: "3.5w",
						share: "3821",
						collect: "2988",
						comment: "3475",
						isLike: false,
						pubtime: "2022-01-10 01:30",
						headimg: "https://a415432669.github.io/shortvideo/001.jpg",
						src: "https://a415432669.github.io/shortvideo/001.mp4"
					},

					{
						id: "002",
						nickname: "小清新",
						content: "感谢每一个我们打开世界的人",
						like: "3.5w",
						share: "3821",
						collect: "2988",
						comment: "3475",
						isLike: false,
						pubtime: "2022-01-10 01:30",
						headimg: "https://a415432669.github.io/shortvideo/002.jpg",
						src: "https://a415432669.github.io/shortvideo/002.mp4"
					},

					{
						id: "003",
						nickname: "琦琦",
						content: "当你来到世界，他就拥有了超能力！致伟大的父亲",
						like: "3.5w",
						share: "3821",
						collect: "2988",
						comment: "3475",
						isLike: false,
						pubtime: "2022-01-10 01:30",
						headimg: "https://a415432669.github.io/shortvideo/003.jpg",
						src: "https://a415432669.github.io/shortvideo/003.mp4"
					},

					{
						id: "004",
						nickname: "老陈打码",
						content: "虎年大吉，虎虎生财好运来！",
						like: "3.5w",
						share: "3821",
						collect: "2988",
						comment: "3475",
						isLike: false,
						pubtime: "2022-01-10 01:30",
						headimg: "https://a415432669.github.io/shortvideo/004.jpg",
						src: "https://a415432669.github.io/shortvideo/004.mp4"
					}
				]
			};
		}

		if (Component) Friend.__proto__ = Component;
		Friend.prototype = Object.create(Component && Component.prototype);
		Friend.prototype.constructor = Friend;
		Friend.prototype.apiready = function() {};
		Friend.prototype.render = function() {
			return apivm.h(
				"view",
				{class: "page"},
				apivm.h(
					"view",
					{class: "friends"},
					(Array.isArray(this.data.videoList)
						? this.data.videoList
						: Object.values(this.data.videoList)
					).map(function(item$1, index$1) {
						return apivm.h(
							"view",
							{class: "friend-item"},
							apivm.h(
								"view",
								{class: "friend-header"},
								apivm.h("image", {src: item$1.headimg}),
								apivm.h(
									"view",
									{class: "msg"},
									apivm.h("view", {class: "username"}, item$1.nickname),
									apivm.h("view", {class: "time"}, item$1.pubtime)
								)
							),
							apivm.h("view", {class: "content"}, item$1.content),
							apivm.h("view", {class: "video"}, apivm.h("video", {src: item$1.src})),
							apivm.h(
								"view",
								{class: "iconlist"},
								apivm.h(
									"div",
									{class: "icon-item"},
									apivm.h("image", {src: "../../image/heart_border.png"}),
									apivm.h("text", null, item$1.like)
								),
								apivm.h(
									"div",
									{class: "icon-item"},
									apivm.h("image", {src: "../../image/comment_border.png"}),
									apivm.h("text", null, item$1.comment)
								),
								apivm.h(
									"div",
									{class: "icon-item"},
									apivm.h("image", {src: "../../image/share_border.png"}),
									apivm.h("text", null, item$1.share)
								)
							)
						);
					})
				),
				apivm.h("tabbar", {active: "friend"})
			);
		};

		return Friend;
	})(Component);
	apivm.define("friend", Friend);
	apivm.render(apivm.h("friend", null), "body");
})();

	window['createApp'] = function() {
		apivm.$_start();
	}
	return avm;
}